//
//  FNNewsDetailController.m
//  FourNews
//
//  Created by admin on 16/3/31.
//  Copyright © 2016年 天涯海北. All rights reserved.
//

#import "FNNewsDetailController.h"
#import "FNNewsDetailContView.h"
#import "MBProgressHUD+MJ.h"


@interface FNNewsDetailController ()

@property (nonatomic, strong) FNNewsDetailContView *contView;

@end

@implementation FNNewsDetailController


- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self setContentScroView];
}

- (void)setContentScroView
{
    
}

- (void)setDetailItem:(FNNewsDetailItem *)detailItem
{
    if (detailItem.ptime == nil) {
        [MBProgressHUD showError:@"暂无数据"];
        return;
    }
    _detailItem = detailItem;
    FNNewsDetailContView *contView = [[FNNewsDetailContView alloc] init];
    contView.frame = self.view.bounds;
    [self.view addSubview:contView];
    contView.detailItem = detailItem;
    contView.contentSize = CGSizeMake(FNScreenW, 300*FNScreenH);
    contView.contentInset = UIEdgeInsetsMake(64, 0, 0, 0);
    contView.contentOffset = CGPointMake(0, -64);
}

@end
